package cn.dubito.miaosha.dao;

import cn.dubito.miaosha.domain.SeckillUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author liliang
 * @description:
 * @date 2018/3/31.
 */
@Mapper
public interface SeckillUserDao {

    /**
     * 根据 ID 获取对象
     *
     * @param id
     * @return
     */
    @Select("select * from seckill_user where id = #{id}")
    public SeckillUser getById(@Param("id") long id);

    /**
     * 更新密码
     *
     * @param seckillUser
     */
    @Update("update seckill_user set password = #{password} where id = #{id}")
    void update(SeckillUser seckillUser);
}
